//
//  RVChargeController.swift
//  AirTravel
//
//  Created by apple on 2021/11/15.
//

import UIKit

enum RVMoneyType {
    case recharge//充值
    case withdraw//提现
}

class RVChargeController: CommonVC {

    @IBOutlet weak var label1: UILabel!
    
    @IBOutlet weak var label2: UILabel!
    
    @IBOutlet weak var label3: UILabel!
    
    @IBOutlet weak var imgView: UIImageView!
    
    @IBOutlet weak var tf: UITextField!
    
    @IBOutlet weak var btn: UIButton!
    
    var type: RVMoneyType
    
    init(type: RVMoneyType) {
        self.type = type
        super.init(nibName: nil, bundle: nil)
    }
    
    required init?(coder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
        
    override func viewDidLoad() {
        super.viewDidLoad()
        btn.setBtnGradient()
        confUI()
    }
    
    func confUI() {
        
        switch type {
        case .recharge:
            head.title.text = "充值"
            label1.text = "充值方式"
            label2.text = "充值金额"
            btn.setTitle("确认充值", for: .normal)
            tf.placeholder? = "请输入充值金额"
        case .withdraw:
            head.title.text = "提现"
            label1.text = "提现方式"
            label2.text = "提现金额"
            btn.setTitle("确认提现", for: .normal)
            tf.placeholder? = "请输入提现金额"
        }
        
        
    }


    /*
    // MARK: - Navigation

    // In a storyboard-based application, you will often want to do a little preparation before navigation
    override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
        // Get the new view controller using segue.destination.
        // Pass the selected object to the new view controller.
    }
    */

}
